function nodeMoveStartEvent() {

}
var g_dx, g_dy = 0;
function nodeMoveEvent(dx, dy, x, y, event) {
	if (context.readOnly) {
		return false;
	}
	if (context.rightClickFlag) {
		return false;
	}
	this.update(dx - (g_dx || 0), dy - (g_dy || 0));
	context.update(x, y);
	g_dx = dx;
	g_dy = dy;
}
function nodeMoveStartEvent(x, y, e) {
}
function nodeMoveEndEvent(e) {
	this.data.x = this.data.view.attr().x;
	this.data.y = this.data.view.attr().y;
	g_dx = 0;
	g_dy = 0;
}

function DrageLister(context, view) {
	var controls = context.paper.set();
	controls.push(view);
	controls[0].update = function(dx, dy) {
		if (this.attr("cx") && this.attr("cy")) {
			this.attr({
				cx : this.attr("cx") + dx,
				cy : this.attr("cy") + y
			});
		} else {
			this.attr({
				x : this.attr("cx") + dx,
				y : this.attr("cy") + y
			});
		}
	};

	controls.drag(nodeMoveEvent, nodeMoveEndEvent);
}